3.283 \(\int \cot ^2(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^2 \, dx\)

Optimal. Leaf size=100 \[ -\frac {a^2 \cot ^5(c+d x)}{5 d}-\frac {2 a^2 \cot ^3(c+d x)}{3 d}+\frac {a^2 \tanh ^{-1}(\cos (c+d x))}{4 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{2 d}+\frac {a^2 \cot (c+d x) \csc (c+d x)}{4 d} \]

[Out]

1/4*a^2*arctanh(cos(d*x+c))/d-2/3*a^2*cot(d*x+c)^3/d-1/5*a^2*cot(d*x+c)^5/d+1/4*a^2*cot(d*x+c)*csc(d*x+c)/d-1/
2*a^2*cot(d*x+c)*csc(d*x+c)^3/d

________________________________________________________________________________________

Rubi [A]  time = 0.21, antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 7, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.241, Rules used = {2873, 2607, 30, 2611, 3768, 3770, 14} \[ -\frac {a^2 \cot ^5(c+d x)}{5 d}-\frac {2 a^2 \cot ^3(c+d x)}{3 d}+\frac {a^2 \tanh ^{-1}(\cos (c+d x))}{4 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{2 d}+\frac {a^2 \cot (c+d x) \csc (c+d x)}{4 d} \]

Antiderivative was successfully verified.

[In]

Int[Cot[c + d*x]^2*Csc[c + d*x]^4*(a + a*Sin[c + d*x])^2,x]

[Out]

(a^2*ArcTanh[Cos[c + d*x]])/(4*d) - (2*a^2*Cot[c + d*x]^3)/(3*d) - (a^2*Cot[c + d*x]^5)/(5*d) + (a^2*Cot[c + d
*x]*Csc[c + d*x])/(4*d) - (a^2*Cot[c + d*x]*Csc[c + d*x]^3)/(2*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 2611

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(a*Sec[e
+ f*x])^m*(b*Tan[e + f*x])^(n - 1))/(f*(m + n - 1)), x] - Dist[(b^2*(n - 1))/(m + n - 1), Int[(a*Sec[e + f*x])
^m*(b*Tan[e + f*x])^(n - 2), x], x] /; FreeQ[{a, b, e, f, m}, x] && GtQ[n, 1] && NeQ[m + n - 1, 0] && Integers
Q[2*m, 2*n]

Rule 2873

Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*
(x_)])^(m_), x_Symbol] :> Int[ExpandTrig[(g*cos[e + f*x])^p, (d*sin[e + f*x])^n*(a + b*sin[e + f*x])^m, x], x]
 /; FreeQ[{a, b, d, e, f, g, n, p}, x] && EqQ[a^2 - b^2, 0] && IGtQ[m, 0]

Rule 3768

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> -Simp[(b*Cos[c + d*x]*(b*Csc[c + d*x])^(n - 1))/(d*(n -
 1)), x] + Dist[(b^2*(n - 2))/(n - 1), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1
] && IntegerQ[2*n]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin {align*} \int \cot ^2(c+d x) \csc ^4(c+d x) (a+a \sin (c+d x))^2 \, dx &=\int \left (a^2 \cot ^2(c+d x) \csc ^2(c+d x)+2 a^2 \cot ^2(c+d x) \csc ^3(c+d x)+a^2 \cot ^2(c+d x) \csc ^4(c+d x)\right ) \, dx\\ &=a^2 \int \cot ^2(c+d x) \csc ^2(c+d x) \, dx+a^2 \int \cot ^2(c+d x) \csc ^4(c+d x) \, dx+\left (2 a^2\right ) \int \cot ^2(c+d x) \csc ^3(c+d x) \, dx\\ &=-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{2 d}-\frac {1}{2} a^2 \int \csc ^3(c+d x) \, dx+\frac {a^2 \operatorname {Subst}\left (\int x^2 \, dx,x,-\cot (c+d x)\right )}{d}+\frac {a^2 \operatorname {Subst}\left (\int x^2 \left (1+x^2\right ) \, dx,x,-\cot (c+d x)\right )}{d}\\ &=-\frac {a^2 \cot ^3(c+d x)}{3 d}+\frac {a^2 \cot (c+d x) \csc (c+d x)}{4 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{2 d}-\frac {1}{4} a^2 \int \csc (c+d x) \, dx+\frac {a^2 \operatorname {Subst}\left (\int \left (x^2+x^4\right ) \, dx,x,-\cot (c+d x)\right )}{d}\\ &=\frac {a^2 \tanh ^{-1}(\cos (c+d x))}{4 d}-\frac {2 a^2 \cot ^3(c+d x)}{3 d}-\frac {a^2 \cot ^5(c+d x)}{5 d}+\frac {a^2 \cot (c+d x) \csc (c+d x)}{4 d}-\frac {a^2 \cot (c+d x) \csc ^3(c+d x)}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.75, size = 189, normalized size = 1.89 \[ -\frac {a^2 \csc ^5(c+d x) \left (180 \sin (2 (c+d x))+30 \sin (4 (c+d x))+200 \cos (c+d x)+20 \cos (3 (c+d x))-28 \cos (5 (c+d x))+150 \sin (c+d x) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-75 \sin (3 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )+15 \sin (5 (c+d x)) \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-150 \sin (c+d x) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+75 \sin (3 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-15 \sin (5 (c+d x)) \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )\right )}{960 d} \]

Antiderivative was successfully verified.

[In]

Integrate[Cot[c + d*x]^2*Csc[c + d*x]^4*(a + a*Sin[c + d*x])^2,x]

[Out]

-1/960*(a^2*Csc[c + d*x]^5*(200*Cos[c + d*x] + 20*Cos[3*(c + d*x)] - 28*Cos[5*(c + d*x)] - 150*Log[Cos[(c + d*
x)/2]]*Sin[c + d*x] + 150*Log[Sin[(c + d*x)/2]]*Sin[c + d*x] + 180*Sin[2*(c + d*x)] + 75*Log[Cos[(c + d*x)/2]]
*Sin[3*(c + d*x)] - 75*Log[Sin[(c + d*x)/2]]*Sin[3*(c + d*x)] + 30*Sin[4*(c + d*x)] - 15*Log[Cos[(c + d*x)/2]]
*Sin[5*(c + d*x)] + 15*Log[Sin[(c + d*x)/2]]*Sin[5*(c + d*x)]))/d

________________________________________________________________________________________

fricas [B]  time = 0.52, size = 189, normalized size = 1.89 \[ \frac {56 \, a^{2} \cos \left (d x + c\right )^{5} - 80 \, a^{2} \cos \left (d x + c\right )^{3} + 15 \, {\left (a^{2} \cos \left (d x + c\right )^{4} - 2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2}\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 15 \, {\left (a^{2} \cos \left (d x + c\right )^{4} - 2 \, a^{2} \cos \left (d x + c\right )^{2} + a^{2}\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 30 \, {\left (a^{2} \cos \left (d x + c\right )^{3} + a^{2} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{120 \, {\left (d \cos \left (d x + c\right )^{4} - 2 \, d \cos \left (d x + c\right )^{2} + d\right )} \sin \left (d x + c\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*csc(d*x+c)^6*(a+a*sin(d*x+c))^2,x, algorithm="fricas")

[Out]

1/120*(56*a^2*cos(d*x + c)^5 - 80*a^2*cos(d*x + c)^3 + 15*(a^2*cos(d*x + c)^4 - 2*a^2*cos(d*x + c)^2 + a^2)*lo
g(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) - 15*(a^2*cos(d*x + c)^4 - 2*a^2*cos(d*x + c)^2 + a^2)*log(-1/2*cos(d*x
 + c) + 1/2)*sin(d*x + c) - 30*(a^2*cos(d*x + c)^3 + a^2*cos(d*x + c))*sin(d*x + c))/((d*cos(d*x + c)^4 - 2*d*
cos(d*x + c)^2 + d)*sin(d*x + c))

________________________________________________________________________________________

giac [A]  time = 0.22, size = 164, normalized size = 1.64 \[ \frac {3 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 15 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} + 25 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 120 \, a^{2} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) - 90 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + \frac {274 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 90 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 25 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 15 \, a^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, a^{2}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5}}}{480 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*csc(d*x+c)^6*(a+a*sin(d*x+c))^2,x, algorithm="giac")

[Out]

1/480*(3*a^2*tan(1/2*d*x + 1/2*c)^5 + 15*a^2*tan(1/2*d*x + 1/2*c)^4 + 25*a^2*tan(1/2*d*x + 1/2*c)^3 - 120*a^2*
log(abs(tan(1/2*d*x + 1/2*c))) - 90*a^2*tan(1/2*d*x + 1/2*c) + (274*a^2*tan(1/2*d*x + 1/2*c)^5 + 90*a^2*tan(1/
2*d*x + 1/2*c)^4 - 25*a^2*tan(1/2*d*x + 1/2*c)^2 - 15*a^2*tan(1/2*d*x + 1/2*c) - 3*a^2)/tan(1/2*d*x + 1/2*c)^5
)/d

________________________________________________________________________________________

maple [A]  time = 0.31, size = 136, normalized size = 1.36 \[ -\frac {7 a^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{15 d \sin \left (d x +c \right )^{3}}-\frac {a^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{2 d \sin \left (d x +c \right )^{4}}-\frac {a^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{4 d \sin \left (d x +c \right )^{2}}-\frac {a^{2} \cos \left (d x +c \right )}{4 d}-\frac {a^{2} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{4 d}-\frac {a^{2} \left (\cos ^{3}\left (d x +c \right )\right )}{5 d \sin \left (d x +c \right )^{5}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(d*x+c)^2*csc(d*x+c)^6*(a+a*sin(d*x+c))^2,x)

[Out]

-7/15/d*a^2/sin(d*x+c)^3*cos(d*x+c)^3-1/2/d*a^2/sin(d*x+c)^4*cos(d*x+c)^3-1/4/d*a^2/sin(d*x+c)^2*cos(d*x+c)^3-
1/4*a^2*cos(d*x+c)/d-1/4/d*a^2*ln(csc(d*x+c)-cot(d*x+c))-1/5/d*a^2/sin(d*x+c)^5*cos(d*x+c)^3

________________________________________________________________________________________

maxima [A]  time = 0.34, size = 109, normalized size = 1.09 \[ -\frac {15 \, a^{2} {\left (\frac {2 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )\right )}}{\cos \left (d x + c\right )^{4} - 2 \, \cos \left (d x + c\right )^{2} + 1} - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )} + \frac {40 \, a^{2}}{\tan \left (d x + c\right )^{3}} + \frac {8 \, {\left (5 \, \tan \left (d x + c\right )^{2} + 3\right )} a^{2}}{\tan \left (d x + c\right )^{5}}}{120 \, d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)^2*csc(d*x+c)^6*(a+a*sin(d*x+c))^2,x, algorithm="maxima")

[Out]

-1/120*(15*a^2*(2*(cos(d*x + c)^3 + cos(d*x + c))/(cos(d*x + c)^4 - 2*cos(d*x + c)^2 + 1) - log(cos(d*x + c) +
 1) + log(cos(d*x + c) - 1)) + 40*a^2/tan(d*x + c)^3 + 8*(5*tan(d*x + c)^2 + 3)*a^2/tan(d*x + c)^5)/d

________________________________________________________________________________________

mupad [B]  time = 8.63, size = 160, normalized size = 1.60 \[ \frac {5\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{96\,d}+\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4}{32\,d}+\frac {a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5}{160\,d}-\frac {a^2\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{4\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (-6\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+\frac {5\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}+a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {a^2}{5}\right )}{32\,d}-\frac {3\,a^2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{16\,d} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((cos(c + d*x)^2*(a + a*sin(c + d*x))^2)/sin(c + d*x)^6,x)

[Out]

(5*a^2*tan(c/2 + (d*x)/2)^3)/(96*d) + (a^2*tan(c/2 + (d*x)/2)^4)/(32*d) + (a^2*tan(c/2 + (d*x)/2)^5)/(160*d) -
 (a^2*log(tan(c/2 + (d*x)/2)))/(4*d) - (cot(c/2 + (d*x)/2)^5*((5*a^2*tan(c/2 + (d*x)/2)^2)/3 - 6*a^2*tan(c/2 +
 (d*x)/2)^4 + a^2/5 + a^2*tan(c/2 + (d*x)/2)))/(32*d) - (3*a^2*tan(c/2 + (d*x)/2))/(16*d)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(d*x+c)**2*csc(d*x+c)**6*(a+a*sin(d*x+c))**2,x)

[Out]

Timed out

________________________________________________________________________________________